<template>
  <div class="mpl-dialog">
    <el-dialog
      v-dialogDrag
      title=""
      :close-on-click-modal="false"
      :visible="$store.state.matlab.showBase64Img"
      :modal="false"
      @close="hide"
    >
      <img :src="imgSrc">
    </el-dialog>
  </div>
</template>

<script>
export default {
  computed: {
    imgSrc() {
      return 'data:image/png;base64,' + this.$store.state.matlab.base64Img;
    }
  },
  methods: {
    hide() {
      this.$store.state.matlab.showBase64Img = false;
    }
  }
};
</script>

<style lang="scss">
.mpl-dialog {
  .el-dialog {
    user-select: none;
    pointer-events: auto;
    width: 700px;
    .el-dialog__body {
      padding-top: 0;
    }
  }
}
</style>
